<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>材料供货单供货确认审核详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../resources/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../resources/css/style.css">
    <style>
        .details ul li {width: 50%;float: left;}
        .layui-table thead th{text-align: left;}
        thead tr th:before {content: "● "; color: #e3e3e3; font-size: 12px;}
        .layui-table td{text-indent: 1rem; font-size: 12px; color: #333;}
        .titles{text-align: center;font-size: 20px;}
        @media screen and (max-width: 768px) {
            .details ul{margin-top: 0;}
            ._MOVE .details ul li{width: 100%;}
            ._MOVE .details .detaL{width: 30%;padding: 0;}
            ._MOVE .details .detaR{width: 70%;padding: 0;}
            ._MOVE .detaileds{width: 100%;overflow-x: auto;}
            ._MOVE .detaileds table{width: 200%!important;overflow-x: auto;}
            ._MOVE .detaileds table thead th, ._MOVE .detaileds table tbody td{width: auto;padding:10px 0;text-align:
                    center;}
            ._MOVE .detaileds table tbody td{text-align: left;}
            .MOVE_title{top: 0;}
            .MOVE_title .shousuo{margin-right: 22px;}

        }
        thead tr th:before{content:'';}
        .layui-table, .layui-table-view{margin-top: 0;}
    </style>
</head>
<body>
<div class="_PC">
    <form class="layui-form layui-form-pane" action="" >
        <button class="layui-btn" type="button" onclick="history.back(-1);"><i class="layui-icon"></i></button>

        <div class="engineering"><!--工程信息-->
            <div class="titles">材料供货单供货</div>
            <div class="details">
                <!--<ul>-->
                <!--<li><span class='detaL'>项目名称：</span><span class="dataR">  西三环通讯管道施工 </span></li>-->
                <!--<li><span class='detaL'>状态：</span><span class="dataR">尚未供料</span></li>-->
                <!--<li><span class='detaL'>施工单位：</span><span class="dataR"> 厂北路-郑上路</span></li>-->
                <!--<li><span class='detaL'>供货地址：</span><span class="dataR">郑州市金水路花园路</span></li>-->
                <!--<li><span class='detaL'>供货时间：</span><span class="dataR">2017年7月15日</span></li>-->

                <!--</ul>-->
            </div>
            <div class="detailed">      <!--材料明细-->
                <div class="titles">材料供货单供货明细</div>

                <div class="detaileds">
                    <table class="layui-table">

                        <thead>
                        <tr>
                            <th>材料名称</th>
                            <th>材料规格</th>
                            <th>计量单位</th>
                            <th>单价</th>
                            <th>送料数量</th>
                            <th>签收数量</th>
                            <th>审批数量</th>
                            <th>小计</th>
                            <th>录入人</th>
                            <th>审核状态</th>
                            <th>备注</th>

                        </tr>
                        </thead>
                        <tbody>
                        <!--<tr>-->
                        <!--<td>三级钢</td>-->
                        <!--<td>28</td>-->
                        <!--<td>t</td>-->
                        <!---->
                        <!--</tr>-->

                        </tbody>
                    </table>
                </div>



            </div>
            <!--<div class="detailed">      &lt;!&ndash;材料明细&ndash;&gt;-->
            <!--<div class="titles">材料供应单（单号：F635）</div>-->

            <!--<div class="detaileds">-->
            <!--<table class="layui-table">-->
            <!--<colgroup>-->
            <!--<col width="150">-->
            <!--<col width="150">-->
            <!--<col width="150">-->
            <!--<col width="150">-->
            <!--<col width="150">-->
            <!--<col width="150">-->
            <!--<col width="150">-->
            <!--</colgroup>-->
            <!--<thead>-->
            <!--<tr>-->
            <!--<th>材料名称</th>-->
            <!--<th>材料规格</th>-->
            <!--<th>数量</th>-->
            <!--</tr>-->
            <!--</thead>-->
            <!--<tbody>-->
            <!--<tr>-->
            <!--<td>三级钢</td>-->
            <!--<td>28</td>-->
            <!--<td>t</td>-->

            <!--</tr>-->
            <!--<tr>-->
            <!--<td>三级钢</td>-->
            <!--<td>28</td>-->
            <!--<td>t</td>-->

            <!--</tr>-->
            <!--<tr>-->
            <!--<td>三级钢</td>-->
            <!--<td>28</td>-->
            <!--<td>t</td>-->

            <!--</tr>-->

            <!--</tbody>-->
            <!--</table>-->
            <!--</div>-->



            <!--</div>-->

        </div>



    </form>
</div>
<script src="../../../resources/layui/layui.js" charset="utf-8"></script>
<script src="../../../resources/js/style.js"></script>
<script src="../../../resources/js/api.js"></script>

<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date1'      //开始时间
        });
        laydate.render({
            elem: '#date2'  //结束时间
        });



        ajaxs('/api/matperson/loadghMoudle.do','post',{'type':'c','remark':sessionStorage.remark,'p':getCookie('yanzheng')},function
            (data) {
            ////console.log(data,'我是新获得的data数据')
            var datas=data.data||[];
            if(datas.length==0){
                $('.detailed').html('暂无数据').addClass('wushuju');
                $('.shousuo').children().hide();
                return;
            }

            for(var i=0;i<datas.length;i++){

                if(i==0){                   //页面公共部分 只选择一次渲染
                    $('.details').append(' <ul>\n' +
                        '                <li><span class=\'detaL\'>项目名称：</span><span class="dataR">'+datas[i].proName+'</span></li>\n' +
                        '                <li><span class=\'detaL\'>施工单位：</span><span class="dataR"> '+datas[i].compName1+'</span></li>\n' +
                        '                <li><span class=\'detaL\'>收货地址：</span><span class="dataR">'+datas[i].r_adr+'</span></li>\n' +
                        '                <li><span class=\'detaL\'>供货时间：</span><span class="dataR">'+datas[i].rCreateTime+'</span></li>\n' +

                        '            </ul>')


                };
                switch (datas[i].validate){
                    case 0:
                        datas[i].validate='审核通过';
                        break;
                    case -1:
                        datas[i].validate='等待审核';
                        break;
                    case 1:
                        datas[i].validate='审核不通过';
                        break;

                }
                if(datas[i].reMarks==null||datas[i].reMarks==''){
                    datas[i].reMarks='无';
                }
                if(datas[i].validate=='undefined'){
                    datas[i].validate='暂未审核'
                }
                if(!datas[i].hasOwnProperty('validate')){       //判断返回数据是否存在validate 这条数据
                    datas[i].validate='暂未审核';
                }
                var xiaoji=0;
                datas[i].mat_Bit=='根'?xiaoji=datas[i].old_Price*datas[i].fin_Num*6:xiaoji=datas[i].old_Price*datas[i].fin_Num;
                datas[i].rm_Num?datas[i].rm_Num=datas[i].rm_Num:datas[i].rm_Num='';


                $('.detaileds tbody').append(' <tr>\n' +
                    '                        <td>'+datas[i].mat_Name+'</td>\n' +
                    '                        <td>'+datas[i].mat_Spec+'</td>\n' +
                    '                        <td>'+datas[i].mat_Bit+'</td>\n' +
                    '                        <td>'+datas[i].old_Price+'</td>\n' +
                    '                        <td>'+datas[i].send_Num+'</td>\n' +
                    '                        <td>'+datas[i].rm_Num+'</td>\n' +
                    '                        <td>'+datas[i].fin_Num+'</td>\n' +
                    '                        <td>'+xiaoji+'</td>\n' +
                    '                        <td>'+datas[i].createUser+'</td>\n' +
                    '                        <td>'+datas[i].validate+'</td>\n' +
                    '                        <td>'+datas[i].reMarks+'</td>\n' +

                    '\n' +
                    '                    </tr>')


            }

        })

        undPan();

    })

</script>
</body>
</html>